﻿using System;
using System.Collections.Generic;
using System.Text;

namespace SSAT.Utils
{
    /// <summary>
    /// Common delegate for methods with return value
    /// and without arguments.
    /// </summary>
    /// <typeparam name="TResult">Type of the return value.</typeparam>
    public delegate TResult Func<TResult>();

    /// <summary>
    /// Common delegate for methods with return value
    /// and with one argument.
    /// </summary>
    /// <typeparam name="T">Type of the argument.</typeparam>
    /// <typeparam name="TResult"></typeparam>
    /// <param name="arg">Type of the return value.</param>
    public delegate TResult Func<T, TResult>(T arg);

    /// <summary>
    /// Common delegate for methods with return value
    /// and with two arguments.
    /// </summary>
    /// <typeparam name="T1">Type of the first argument.</typeparam>
    /// <typeparam name="T2">Type of the second argument.</typeparam>
    /// <typeparam name="TResult">Type of the return value.</typeparam>
    public delegate TResult Func<T1, T2, TResult>(T1 arg1, T2 arg2);
}
